package org.springblade.demo05.controller;

import org.springblade.demo05.entity.Idioms;
import org.springblade.demo05.service.IdiomsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/idioms")
public class IdiomsController {
    @Autowired
    public IdiomsService idiomsService;

    @GetMapping("/wordQuery")
    public Idioms getAllIdioms(@RequestParam String name){
        return idiomsService.getAllIdioms(name);
    }
}
